<?php
namespace app\teacherRoutine\controller;
use app\common\Base;
use app\common\StudentModel;
use think\Db;

class TeacherEvaluateQuery extends Base {
	
	public function index() {
		return $this->fetch();
	}

	public function pageQuery() {
		$grade = input("grade");
		$clazz = input("clazz");
		$name = input("studentName");
		$page = input("page");
		$rows = input("rows");
		$where["转出学期ID"] = array("eq", 0);
		$where["年级号"] = array("gt", currTerm()["finishedKey"]);
		if($grade) {
			$array = explode("_", $grade);
			$where["年级号"] = array("eq", $array[0]);
			$where["学籍类型"] = array("eq", $array[1]);
		}
		if($clazz) $where["班号"] = array("eq", $clazz);
		if($name) $where["姓名"] = array("like", $name."%");
		$fields = [];
		$Model = new StudentModel();
		return $Model->getStudentList($page, $rows, $fields, $where, null);
	}

}
